import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: function () {
      return import(/* webpackChunkName: "Layout" */ '@/views/Layout/index.vue')
    },
    redirect: '/numberInput',
    children: [
      {
        path: '/threshold',
        name: 'Threshold',
        component: function () {
          return import(/* webpackChunkName: "Threshold" */ '../views/Threshold/index.vue')
        }
      },
      {
        path: '/numberInput',
        name: 'NumberInput',
        component: function () {
          return import(/* webpackChunkName: "NumberInput" */ '@/views/NumberInput/index.vue')
        }
      }
    ]
  },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
